<% @page_title = ' :: New Broadcast' -%>

<% content_for :sidebar do %>
	<div class="little_infos">
		<div class="little_content"><%= awareness_message %></div>
		
		<div class="little_content">
		<span class="sidebar_title">Info</span>
		<% if @program %>
			This Broadcast will be associated to&nbsp;
			<%= (link_to "#{@program.name}", :controller => 'programs', :action => 'show', :id => @program) + ' Program' %>
		<% end %>
		</div>
	</div>
<% end %>

<h1>New Broadcast</h1>

<% form_for :broadcast, :url => { :action => 'create' } do |f| %>
<% field_set_tag do %>
	<%= f.hidden_field :program_id, :value => @program.id if @program %>

	<div class="span-7">
		<p><label for="broadcast_name">Broadcast Name</label><br />
		<%= f.text_field :name, :class => 'text required_field' %></p>
	</div>

	<div class="span-7 last">
		<p><label for="broadcast_short_description">Short Description</label><br />
		<%= f.text_field :short_description, :class => 'text required_field' %></p>
	</div>
	
	<hr class="separator" />
	<div class="span-17 last">
		<p><label for="broadcast_description">Description</label><br />
		<%= f.text_area :description, :cols => 15, :rows => 5 %></p>
	</div>
	
	<hr class="separator" />
	<div class="span-5">
		<p><label for="broadcast_language">Language</label><br />
		<%= f.select :language, @languages, { :prompt => 'Select a Language' } %></p>
	</div>
	
	<div class="span-6">
		<p><label for="broadcast_genre">Genre</label><br />
		<%= f.select :genre, @genres.each {|g| g}, { :prompt => 'Select a Genre' } %></p>
	</div>
	
	<div class="span-6 last">
		<p class="with_calendar_img"><label for="broadcast_broadcast_date">Broadcast Date</label><br />
		<%= f.calendar_date_select :broadcast_date, :popup => :force, :time => true, :class => 'text', :value => Time.now.to_date.to_s, :month_year => "label" %></p>
	</div>
<% end %>

<% field_set_tag 'Associate Audio Assets' do %>
	<%= render :partial => 'audio_assets/list_choices', :locals => { :audio_assets => @user_audio_assets } %>
<% end %>

	<div class="span-17 last centered">
		<%= submit_tag 'Create Broadcast', :disable_with => 'Creating&hellip;', :class => 'buttons' %>
	</div>
<% end %>